using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TriaServer.Model;
using TriaServer.Service;
using Leeder.Business;

namespace TriaServer.Business
{
    /// <summary>
    /// 
    /// </summary>
   public class QueueInfoBLL : BaseBLL<QueueInfoModel, QueueInfoService>
   {
        public QueueInfoBLL()
        {
            Service = new QueueInfoService();
        }

        public QueueInfoModel GetQueueInfoModelByVin(string vin)
        {
            var result = Service.Query(p => p.VIN == vin);
            if(result.IsSuccess)
            {
                return result.ActivedObj.FirstOrDefault();
            }
            else
            {
                LogObj.Error($"GetQueueInfoModelByVin:{result.Dsca}");
                return default;
            }
        }
    }
}
